package net.uhuijia.user.useraddress.service;

import net.uhuijia.appbase.service.BaseService;
import net.uhuijia.user.usermall.persistence.model.UserMall;
import net.uhuijia.vo.user.useraddress.returnvo.AddressListVo;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import net.uhuijia.user.useraddress.persistence.model.UserAddress;
import net.uhuijia.user.useraddress.persistence.model.UserAddressExample;

import java.util.List;


@Service
@Transactional
public interface UserAddressService
     extends BaseService<UserAddress,UserAddressExample> {

    UserAddress addAddress(UserMall userMall,String receiveName, String receivePhone, String provinceId, String cityId, String regionId, String detailaAddress,String isDefault);


    UserAddress addUserAddress(String userId,String receiveName, String receivePhone, String provinceId,String province, String cityId,String city, String regionId, String region,String detailaAddress,String isDefault);
    /**
     * @Author xzj
     * @Description //查询用户默认收获地址
     * @Date  2018/10/9
     * @Param [userId]
     * @return net.uhuijia.user.useraddress.persistence.model.UserAddress
     **/
    UserAddress getUserDefaultAddress(String userId);
    /**
     * @Author xzj
     * @Description //收货地址列表
     * @Date  2018/10/9
     * @Param [userMall, example]
     * @return java.util.List<net.uhuijia.vo.user.useraddress.returnvo.AddressListVo>
     **/
    List<AddressListVo> findAddressList(UserMall userMall , UserAddressExample example);
    /**
     * @Author xzj
     * @Description //分页查询用户收货地址列表
     * @Date  2018/10/9
     * @Param [userMall, example]
     * @return java.util.List<net.uhuijia.user.useraddress.persistence.model.UserAddress>
     **/
    List<UserAddress> findUserAddressListByUserIdandPage(UserMall userMall ,UserAddressExample example);
}